package com.rongc.client.freight;

import com.rongc.client.core.Constants;
import com.rongc.client.core.utils.SPUtil;

/**
 * Created by Bruce on 2017/6/24.
 */
public class ApiUrl {
//    private static final String DEBUG_HOST = "http://47.94.156.140/sula/";
    private static final String DEBUG_HOST = "http://120.132.13.217:8080/sula/";
//    private static final String DEBUG_HOST = "http://192.168.8.107:8080/sula/";
//    private static final String DEBUG_HOST = "http://v150n34900.imwork.net:33134/sula/";

    private static final String ONLINE_HOST = "#";

    public static String getDefaultHost() {
        if (SPUtil.has("host")) {
            return SPUtil.getString("host",DEBUG_HOST);
        } else if (Constants.IS_DEBUG) {
            return DEBUG_HOST;
        } else {
            return ONLINE_HOST;
        }
    }

    public static String getImgUrl(String url){
        return getDefaultHost() + "UserImgs/"+url;
    }

    public static String getCarImgUrl(String url){
        return getDefaultHost() + "tcimg/"+url;
    }

    // 获取字典信息
    public static String getDictsUrl() {
        return getDefaultHost() + "appserver/index/queryDicts";
    }

    // 上传经纬度接口
    public static String getAppUserPositionUrl() {
        return getDefaultHost() + "appserver/waybill/app_user_position";
    }

    // 获取验证码
    public static String getVerifyCodeUrl() {
        return getDefaultHost() + "appserver/index/sendVerifyCode";
    }

    // 首次进去设置角色
    public static String getSetTypeUrl() {
        return getDefaultHost() + "appserver/index";
    }

    // 判断用户是否实名认证
    public static String getIsAuthUrl() {
        return getDefaultHost() + "appserver/index/is_renzheng";
    }

    // 获取用户信息
    public static String getUserInfoUrl() {
        return getDefaultHost() + "appserver/user/app_userById";
    }

    // 修改用户用户名
    public static String getUpdateNickUrl() {
        return getDefaultHost() + "appserver/user/app_user_updateNick";
    }

    // 修改用户头像
    public static String getUpdateImgUrl() {
        return getDefaultHost() + "appserver/user/app_user_updateImg";
    }

    // 我的评价
    public static String getMyReplayUrl() {
        return getDefaultHost() + "appserver/user/app_my_replay";
    }

    // 我收到的评价
    public static String getMyGetReplayUrl() {
        return getDefaultHost() + "appserver/user/app_my_getreplay";
    }

    // 签到
    public static String getMarkUrl() {
        return getDefaultHost() + "appserver/user/app_userQiandao";
    }

    // 意见反馈
    public static String getFeedbackUrl() {
        return getDefaultHost() + "appserver/user/app_feedback";
    }

    // 关于
    public static String getAboutUrl() {
        return getDefaultHost() + "appserver/user/app_about_we";
    }

    // 遇到问题
    public static String getProblemUrl() {
        return getDefaultHost() + "appserver/user/app_help";
    }

    // 我的签到
    public static String getMyMarkUrl() {
        return getDefaultHost() + "appserver/user/app_my_qiandao";
    }

    // 消息
    public static String getLoadMessageUrl() {
        return getDefaultHost() + "appserver/message/loadMessages";
    }

    // 版本更新
    public static String getVersionUrl() {
        return getDefaultHost() + "appserver/user/app_version";
    }



    // 登陆
    public static String getLoginUrl() {
        return getDefaultHost() + "appserver/index/login";
    }

    // 首页轮播
    public static String getBannerUrl() {
        return getDefaultHost() + "appserver/index/banners";
    }

    // 货主身份验证
    public static String getShipperVerifyUrl() {
        return getDefaultHost() + "appserver/index/shipperVerify";
    }

    // 司机身份验证
    public static String getDriverVerifyUrl() {
        return getDefaultHost() + "appserver/index/driverVerify";
    }

    // 我的钱包
    public static String getMyWalletUrl() {
        return getDefaultHost() + "appserver/user/app_my_transaction";
    }

    // 修改支付密码
    public static String getSetPaypwdUrl() {
        return getDefaultHost() + "appserver/user/app_zhifu_set";
    }

    // 绑定银行卡
    public static String getBindingBankUrl() {
        return getDefaultHost() + "appserver/person/bindingBankCard";
    }

    // 提现
    public static String getCashoutUrl() {
        return getDefaultHost() + "appserver/person/cashOut";
    }

    // 充值
    public static String getChongzhiUrl() {
        return getDefaultHost() + "appserver/user/app_chongzhi";
    }

    // 我的积分明细
    public static String getJiFenUrl() {
        return getDefaultHost() + "appserver/user/app_my_jifen";
    }

    // 按用户更新未读数据接口
    public static String getupdateReadAllUrl() {
        return getDefaultHost() + "appserver/message/updateReadAll";
    }

    // 获取未读条数接口
    public static String getUnReadCount() {
        return getDefaultHost() + "appserver/message/getUnReadCount";
    }






    // 首页货主运单列表
    public static String getHostWayBillUrl() {
        return getDefaultHost() + "appserver/waybill/app_waybill";
    }

    // 货主发布货源
    public static String getPubSupplyUrl() {
        return getDefaultHost() + "appserver/goods/publishGoods";
    }

    // 计算价格
    public static String getGoodsOfferUrl() {
        return getDefaultHost() + "appserver/driver/goodsOffer";
    }

    // 发布货源后推荐车辆
    public static String getFindDriverUrl() {
        return getDefaultHost() + "appserver/driver/findDriver";
    }

    // 找车
    public static String getSearchDriversUrl() {
        return getDefaultHost() + "appserver/driver/searchDrivers";
    }

    // 车源详情
    public static String getConveyanceDetailUrl() {
        return getDefaultHost() + "appserver/person/loadDriverInfo";
    }

    // 货主加价
    public static String getModifyPriceUrl() {
        return getDefaultHost() + "appserver/person/increasePrice";
    }

    // 取消货源（货主）
    public static String getGoodsCancelUrl() {
        return getDefaultHost() + "appserver/waybill/app_goods_cancel";
    }

    // 查询货主是否存在发布中的货源
    public static String getHasList2MatchUrl() {
        return getDefaultHost() + "appserver/person/is_goods_fb";
    }

    // 派单中的货源列表
    public static String getTruckList2MatchUrl() {
        return getDefaultHost() + "appserver/person/selectWaybillfb";
    }

    // 投诉
    public static String getComplainUrl() {
        return getDefaultHost() + "appserver/index/addComplain";
    }



    // 首页车主运单列表
    public static String getHostWayBillSJUrl() {
        return getDefaultHost() + "appserver/waybill/app_waybill_sj";
    }

    // 司机添加车辆
    public static String getAddCarUrl() {
        return getDefaultHost() + "appserver/driver/addCarInfo";
    }

    // 司机获取车辆
    public static String getCarListUrl() {
        return getDefaultHost() + "appserver/driver/loadMimeCars";
    }

    // 司机发布车源
    public static String getPubConveyanceUrl() {
        return getDefaultHost() + "appserver/driver/publishCarInfo";
    }

    // 发布车源后推荐货源
    public static String getFindGoodsUrl() {
        return getDefaultHost() + "appserver/driver/findgoods";
    }

    // 找货
    public static String getSearchGoodsUrl() {
        return getDefaultHost() + "appserver/person/searchGoods";
    }

    // 货源详情
    public static String getSupplyDetailUrl() {
        return getDefaultHost() + "appserver/person/loadGoodsDetail";
    }

    // 取消车源（车主）
    public static String getTrucksCancelUrl() {
        return getDefaultHost() + "appserver/waybill/app_trucks_cancel";
    }

    // 车主接单待确认
    public static String getTrucksConfirmedUrl() {
        return getDefaultHost() + "appserver/waybill/app_trucks_confirmed";
    }

    // 查询车主是否存在发布中的车源
    public static String getHasTruckList2MatchUrl() {
        return getDefaultHost() + "appserver/person/is_car_fb";
    }

    // 接单中的车源列表
    public static String getList2MatchUrl() {
        return getDefaultHost() + "appserver/person/selectcarfb";
    }









    //
    public static String getAlipayUrl() {
        return getDefaultHost() + "appserver/pay/toPay";
    }

    public static String getQianbaoUrl() {
        return getDefaultHost() + "appserver/pay/app_qianbao_zhifu";
    }

    public static String getWXpayUrl() {
        return getDefaultHost() + "appserver/wxPay/weixin_pay";
    }

    // 生成运单
    public static String getWaybillCreateUrl() {
        return getDefaultHost() + "appserver/person/initWaybill";
    }

    // 司机找货源生成运单
    public static String getWaybillTrucksCreateUrl() {
        return getDefaultHost() + "appserver/person/initWaybill_trucks";
    }

    // 修改运单状态
    public static String getModifyWaybillUrl() {
        return getDefaultHost() + "appserver/waybill/app_infowaybill_OK";
    }

    // 运单详情
    public static String getWaybillUrl() {
        return getDefaultHost() + "appserver/waybill/app_infowaybill";
    }

    // 货主拒绝车主接单
    public static String getWaybillCancelUrl() {
        return getDefaultHost() + "appserver/waybill/app_jujue_cancel";
    }

    // 评论
    public static String getWaybillReplayUrl() {
        return getDefaultHost() + "appserver/waybill/app_infowaybill_replay";
    }

    // 上传回单
    public static String getWaybillHuidanUrl() {
        return getDefaultHost() + "appserver/waybill/app_infowaybill_huidan";
    }

    // 运单加价
    public static String getWaybilladdpriceUrl() {
        return getDefaultHost() + "appserver/waybill/app_lxtrucks_addprice";
    }

}
